package com.xiaoge.iocbeanlifecle;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * TODO 初始化前  初始化  初始化后
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
@Component
public class LifecycleBeanService implements InitializingBean {

	@PostConstruct
	public void before() {
		System.out.println("初始化前......");
	}

	/**
	 * 初始化
	 * @throws Exception
	 */
	@Override
	public void afterPropertiesSet() throws Exception {
		System.out.println("初始化......");
	}
}
